﻿using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace NewCodeAPI.Migrations
{
    /// <inheritdoc />
    public partial class inital : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterDatabase()
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "answer_info",
                columns: table => new
                {
                    paper_id = table.Column<int>(type: "int", nullable: false, comment: "试卷ID"),
                    user_id = table.Column<int>(type: "int", nullable: false, comment: "考生ID"),
                    user_type = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: false, defaultValueSql: "''", comment: "考生类型（1-招生模块，2-教学模块）不同类型，对应不同的人员表", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    cost_time = table.Column<TimeOnly>(type: "time", nullable: true, defaultValueSql: "'00:00:00'", comment: "目前答卷耗费时长（00：09：30）"),
                    leave_limit = table.Column<int>(type: "int", nullable: false, comment: "离开次数"),
                    finish_flag = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: false, defaultValueSql: "''", comment: "是否完成答卷标志位（0-未完成，1-已完成）", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    start_time = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "答卷开始时间（YYYY-MM-DD HH-mm-SS）", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    end_time = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "答卷结束时间（YYYY-MM-DD HH-mm-SS）", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    score = table.Column<float>(type: "float(5,2)", nullable: true, comment: "考生答卷总得分"),
                    pass_flag = table.Column<int>(type: "int", nullable: true, defaultValueSql: "'0'", comment: "考试通过标志（0-未通过，1-通过）"),
                    judge_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "判卷人（系统或人）", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    judge_time = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "判卷时间（YYYY-MM-DD HH-mm-SS）", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    plan_id = table.Column<int>(type: "int", nullable: true)
                },
                constraints: table =>
                {
                },
                comment: "答卷情况表")
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "answer_sheet",
                columns: table => new
                {
                    paper_id = table.Column<int>(type: "int", nullable: false, comment: "试卷ID"),
                    plan_id = table.Column<int>(type: "int", nullable: false),
                    question_id = table.Column<int>(type: "int", nullable: false, comment: "题目ID"),
                    user_id = table.Column<int>(type: "int", nullable: false, comment: "考生ID"),
                    user_type = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: false, defaultValueSql: "''", comment: "考生类型（1-招生模块，2-教学模块），不同类型，对应不同的人员表", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    answer = table.Column<string>(type: "varchar(15000)", maxLength: 15000, nullable: true, comment: "考生答案（多选题和多空填空题，答案之间使用#$#来分隔）", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    answer_time = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, defaultValueSql: "''", comment: "答题时间（YYYY-MM-DD HH-mm-SS）", collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    remark = table.Column<string>(type: "varchar(1000)", maxLength: 1000, nullable: true, comment: "备注", collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    score = table.Column<float>(type: "float(5,2)", nullable: true, defaultValueSql: "'0.00'", comment: "考生此题得分"),
                    judge_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "阅卷人（系统或人）", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    judge_time = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "阅卷时间（YYYY-MM-DD HH-mm-SS）", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                },
                comment: "答题卡")
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "base_course",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false, comment: "id自增主键")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    no = table.Column<int>(type: "int", nullable: true, comment: "基地代码"),
                    area = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "区域", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    area_zh_TW = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "区域zh_TW", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    area_en_US = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "区域en_US", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    trainingBase = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "培训基地", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    trainingBase_en_US = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "培训基地en_US", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    trainingBase_zh_TW = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "培训基地zh_TW", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    address = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "基地地址", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    address_en_US = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "基地地址en_US", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    address_zh_TW = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "基地地址zh_TW", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    describe = table.Column<string>(type: "varchar(2000)", maxLength: 2000, nullable: true, comment: "描述", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    describe_en_US = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "描述en_US", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    describe_zh_TW = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "描述zh_TW", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    personId = table.Column<int>(type: "int", nullable: true, comment: "基地管理员"),
                    createTime = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "创建时间", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    creator = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    updateTime = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "更新时间", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    updator = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "更新人", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    del = table.Column<int>(type: "int", nullable: true, comment: "是否删除"),
                    remark = table.Column<string>(type: "varchar(4000)", maxLength: 4000, nullable: true, comment: "备注", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "calendar",
                columns: table => new
                {
                    date = table.Column<string>(type: "varchar(8)", maxLength: 8, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    holiday = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    comment = table.Column<string>(type: "varchar(60)", maxLength: 60, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.date);
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "certificate",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false, comment: "id自增主键")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    enrollId = table.Column<int>(type: "int", nullable: true, comment: "报名ID"),
                    certificateNumber = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "证书号", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    state = table.Column<int>(type: "int", nullable: true, comment: "证书状态（0-申请中  1-基地管理员审核 2-中心管理员审核）"),
                    path = table.Column<string>(type: "varchar(512)", maxLength: 512, nullable: true, comment: "路径", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    createTime = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "创建时间", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    creator = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    updateTime = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "更新时间", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    updator = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "更新人", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    del = table.Column<int>(type: "int", nullable: true, comment: "是否删除"),
                    remark = table.Column<string>(type: "varchar(4000)", maxLength: 4000, nullable: true, comment: "备注", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    history = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "certificate_his",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false, comment: "id")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    certificate_number = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true, comment: "证书编号", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    path = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "证书路径", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    user_name = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true, comment: "用户姓名", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    pinyin = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true, comment: "姓名拼音", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    email = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "邮箱", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    course = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "课程名称", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    base_no = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "基地代码", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    training_base = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "基地名称", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    periods = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "期数", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    address = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "基地地址", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    state = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, comment: "证书状态", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    seq = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: true, comment: "学员序号", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    start_time = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true, comment: "开课开始日期", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    end_time = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true, comment: "开课结束日期", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    history = table.Column<int>(type: "int", nullable: true, comment: "是否是历史数据1-是，0-否")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_general_ci");

            migrationBuilder.CreateTable(
                name: "china_regions",
                columns: table => new
                {
                    ID = table.Column<long>(type: "bigint", nullable: false, comment: "县及县以上行政区划代码表")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    CODE = table.Column<string>(type: "varchar(11)", maxLength: 11, nullable: true, comment: "区域代码", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    PARENT_ID = table.Column<string>(type: "varchar(11)", maxLength: 11, nullable: true, comment: "父级区域代码", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    NAME = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "区域名称", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    STATUS = table.Column<long>(type: "bigint", nullable: true, defaultValueSql: "'0'", comment: "开通状态,默认值0:开通，1：不开通")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.ID);
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_general_ci");

            migrationBuilder.CreateTable(
                name: "class",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    no = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    name = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "考场名", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    name_en_US = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "考场名英文", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    name_zh_TW = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "考场名繁体", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    description = table.Column<string>(type: "varchar(600)", maxLength: 600, nullable: true, comment: "考场描述", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    description_en_US = table.Column<string>(type: "varchar(800)", maxLength: 800, nullable: true, comment: "考场描述英文", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    description_zh_TW = table.Column<string>(type: "varchar(600)", maxLength: 600, nullable: true, comment: "考场描述繁体", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    student_monitor = table.Column<int>(type: "int", nullable: true, comment: "班长"),
                    teacher_monitor = table.Column<int>(type: "int", nullable: true, comment: "班主任"),
                    courseId = table.Column<int>(type: "int", nullable: true, comment: "课程ID"),
                    property = table.Column<int>(type: "int", nullable: true, comment: "考场属性（0-正常考场，1-补考考场）"),
                    makeup_class_id = table.Column<int>(type: "int", nullable: true, comment: "补考的考场ID"),
                    direction = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    size = table.Column<int>(type: "int", nullable: true),
                    session = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    session_en_US = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    session_zh_TW = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    location = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    enable = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "class_begins",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false, comment: "id自增主键")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    baseId = table.Column<int>(type: "int", nullable: true, comment: "基地id"),
                    courseId = table.Column<int>(type: "int", nullable: true, comment: "课程Id"),
                    periods = table.Column<string>(type: "varchar(4)", maxLength: 4, nullable: true, comment: "期数", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    teacherId = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "导师\"编号-导师Id\"", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    startTime = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "课程开始时间", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    endTime = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "课程结束时间", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    createTime = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "创建时间", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    creator = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    updateTime = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "更新时间", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    updator = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "更新人", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    del = table.Column<int>(type: "int", nullable: true, comment: "是否删除"),
                    remark = table.Column<string>(type: "varchar(4000)", maxLength: 4000, nullable: true, comment: "备注", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "course",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    no = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    name = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    name_en_US = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    name_zh_TW = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "课程名称（TW）", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    title = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "标题", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    title_en_US = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "标题(en)", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    title_zh_TW = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "标题(tw)", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    description = table.Column<string>(type: "varchar(600)", maxLength: 600, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    description_en_US = table.Column<string>(type: "varchar(800)", maxLength: 800, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    description_zh_TW = table.Column<string>(type: "varchar(600)", maxLength: 600, nullable: true, comment: "课程描述（TW）", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    course_card_imag = table.Column<string>(type: "mediumtext", nullable: true, comment: "课程卡片图片", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    course_content = table.Column<string>(type: "longtext", nullable: true, comment: "课程正文内容", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    course_content_en_US = table.Column<string>(type: "longtext", nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    course_content_zh_TW = table.Column<string>(type: "longtext", nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    property = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    direction = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    function = table.Column<string>(type: "varchar(1000)", maxLength: 1000, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    function_en_US = table.Column<string>(type: "varchar(1500)", maxLength: 1500, nullable: true, collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    function_zh_TW = table.Column<string>(type: "varchar(1000)", maxLength: 1000, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    @lock = table.Column<string>(name: "lock", type: "varchar(2)", maxLength: 2, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    enable = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    category = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, comment: "课程类别 CSE_TYPE（ 1-Technology 2-Business 3-Soft Skills 4-Language 5-Process 6-Certification 7-Other ）", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    cost_number = table.Column<float>(type: "float(5,2)", nullable: true, defaultValueSql: "'0.00'", comment: "课程花费"),
                    cost_unit = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, comment: "课程花费单位 COST_UNIT (1-月 2-星期 3-天 4-小时 5-分钟)", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    level = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, comment: "课程难易度级别 CSE_DIFF (1-初级(Entry) 2-中级(Intermediate) 3-高级(Senior))", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    trainer_avl = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, comment: "教授者是否可得 TRAINER_AVL （1-外部聘请(External) 2-内部可供(Available) 3-内部未供(Not Available)）", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    presentation_avl = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, comment: "教材讲义是否可得 AVL (1-提供(Available) 2-未供(Not Available) 3-未知(N/A))", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    stu_manual_avl = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, comment: "学生手册是否可得 AVL (1-提供(Available) 2-未供(Not Available) 3-未知(N/A))", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    act_book_avl = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, comment: "实验手册是否可得 AVL (1-提供(Available) 2-未供(Not Available) 3-未知(N/A))", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    quiz_avl = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, comment: "测验是否提供 AVL (1-提供(Available) 2-未供(Not Available) 3-未知(N/A))", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    exec_pf_avl = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, comment: "练习平台是否提供 AVL (1-提供(Available) 2-未供(Not Available) 3-未知(N/A))", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    target_client = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "目标客户 CLIENTS ( 如：SCBC-渣打 HSBC-汇丰 )（以字符串方式存储，使用，来分隔）", collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_time = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_person = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_time = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_person = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    price = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "课程价格", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "course_material",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    courseid = table.Column<int>(type: "int", nullable: false),
                    classbeginsid = table.Column<int>(type: "int", nullable: true),
                    category = table.Column<sbyte>(type: "tinyint", nullable: true, comment: "1.课程学习资料 2.课堂花絮 3.课程表"),
                    type = table.Column<sbyte>(type: "tinyint", nullable: false, comment: "1.mp4;2.pdf;3.jpg;4.jpeg;5.png"),
                    path = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: false, collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    title = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    shortdescription = table.Column<string>(type: "varchar(1000)", maxLength: 1000, nullable: true, collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    createdatetime = table.Column<DateTime>(type: "datetime", nullable: false),
                    modifydatetime = table.Column<DateTime>(type: "datetime", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"),
                    operatorid = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: false, collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_general_ci");

            migrationBuilder.CreateTable(
                name: "course_registration",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false, comment: "id自增主键")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    personId = table.Column<int>(type: "int", nullable: true, comment: "用户Id"),
                    seq = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: false, comment: "序列", collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    classBeginsId = table.Column<int>(type: "int", nullable: true, comment: "开课Id"),
                    time = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "报名课程时间", collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    pay = table.Column<int>(type: "int", nullable: true, comment: "报名课程支付信息（0-未支付，1-已支付）"),
                    createTime = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "创建时间", collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    creator = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人", collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    updateTime = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "更新时间", collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    updator = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "更新人", collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    del = table.Column<int>(type: "int", nullable: true, comment: "是否删除"),
                    remark = table.Column<string>(type: "varchar(4000)", maxLength: 4000, nullable: true, comment: "备注", collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    check = table.Column<int>(type: "int", nullable: true, comment: "审核 0-未审核 1-已审核")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_general_ci");

            migrationBuilder.CreateTable(
                name: "exercise_score",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false, comment: "主键ID\r")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    plan_id = table.Column<int>(type: "int", nullable: false, comment: "教学计划ID\r"),
                    student_id = table.Column<int>(type: "int", nullable: false, comment: "学生ID\r"),
                    paper_id = table.Column<int>(type: "int", nullable: false, comment: "试卷ID\r"),
                    true_score = table.Column<float>(type: "float(5,2)", nullable: false, comment: "卷面分数\r"),
                    switch_score = table.Column<float>(type: "float(5,2)", nullable: false, comment: "转换分数\r"),
                    del = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, defaultValueSql: "'N'", comment: "删除标示 Y-已删除 N-未删除\r", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, comment: "创建时间(20150901 115959000)\r", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, comment: "创建人\r", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, comment: "修改时间(20150901 115959000)\r", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, comment: "修改人\r", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                },
                comment: "学生平时成绩明细")
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "exercise_score_ratio",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false, comment: "主键ID")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    plan_id = table.Column<int>(type: "int", nullable: false, comment: "教学计划ID"),
                    paper_id = table.Column<int>(type: "int", nullable: false, comment: "试卷ID"),
                    ratio = table.Column<int>(type: "int", nullable: false, comment: "加权比例"),
                    flag = table.Column<int>(type: "int", nullable: false, comment: "是否为最终测验卷 0-不是 1-是"),
                    del = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, defaultValueSql: "'N'", comment: "删除标示 Y-已删除 N-未删除", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, comment: "创建时间(20150901 115959000)", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, comment: "创建人", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, comment: "修改时间(20150901 115959000)", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, comment: "修改人", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                },
                comment: "平时成绩组成加权表")
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "interviewee",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false, comment: "id自增主键")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    username = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, defaultValueSql: "''", comment: "用户名", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    password = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "密码", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    name = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, defaultValueSql: "''", comment: "中文名", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    spell_name = table.Column<string>(type: "varchar(30)", maxLength: 30, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    gender = table.Column<string>(type: "varchar(3)", maxLength: 3, nullable: false, defaultValueSql: "''", comment: "性别（0-女，1-男）", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    age = table.Column<int>(type: "int", nullable: true, comment: "年龄"),
                    birthday = table.Column<string>(type: "varchar(8)", maxLength: 8, nullable: true, comment: "出生日期", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    cardno = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: true, comment: "身份证号", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    mobile = table.Column<string>(type: "varchar(11)", maxLength: 11, nullable: false, defaultValueSql: "''", comment: "手机号码", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    email = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, defaultValueSql: "''", comment: "电子邮件", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    degree = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, comment: "学历（选框已有）", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    graduate_month = table.Column<string>(type: "varchar(7)", maxLength: 7, nullable: true, comment: "毕业年月，如 2016-07", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    work_location = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, comment: "工作地点LOCATION", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    work_loc_comment = table.Column<string>(type: "varchar(90)", maxLength: 90, nullable: true, comment: "工作地点描述", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    proj_group = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, comment: "项目组别 PROJ_GROUP( 1-CSTC-ICG 2-CSTS-GCT-BI 3-CSTS-GCT-CBK 4-CSTS-GCT-CM 5-CSTS-GCT-CSS 6-CSTS-GCT-EBT 7-CSTS-GCT-ECS 8-CSTS-GCT-TC 9-CSTS-GCT-WM 10-SSVB 11-Sonny 12-交行 13-摩根 14-益伯睿 15-拓明 16-量子金服 17-富达 18-SCB 19-后台TCS 20-后台PD)", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    proj_group_comment = table.Column<string>(type: "varchar(90)", maxLength: 90, nullable: true, comment: "项目组别描述", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    univ_id = table.Column<int>(type: "int", nullable: false, comment: "学校ID(为0表示为空)"),
                    univ_comment = table.Column<string>(type: "varchar(300)", maxLength: 300, nullable: true, comment: "学校备注", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    college_id = table.Column<int>(type: "int", nullable: false, comment: "学院ID(为0表示为空)"),
                    college_comment = table.Column<string>(type: "varchar(300)", maxLength: 300, nullable: true, comment: "学院备注", collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    major = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, comment: "所学专业 MAJOR(1-计算机科学与技术 2-软件工程 3-电子商务 4-电子信息工程 5-网络工程 6-通讯工程 7-信息系统与信息管理 8-计算机软件 9-软件服务外包 10-物联网工程)", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    major_comment = table.Column<string>(type: "varchar(90)", maxLength: 90, nullable: true, comment: "所学专业备注", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    english_level = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, comment: "英语等级 ENG_LEVEL（0-无，1-四级,2-六级，3-专四，4-专八，5-托福，6-雅思）", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    talent_source = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, comment: "人才来源 TAL_SOURCE（1-校宣讲会，2-校招聘会，3-网络招聘，4-培训学校，5-其他途径）", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    recruit_state = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, comment: "招聘状态 RC_STATE（1-筛选简历不合格，2-筛选简历合格，3-未参加初试，4-参加初试，5-放弃初试，6-初试不合格，7-初试合格，8-未完善简历，9-已完善简历，10-放弃完善简历）", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    state_comment = table.Column<string>(type: "varchar(2000)", maxLength: 2000, nullable: true, comment: "招聘状态说明", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    photo_url = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "头像存放地址", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    resume_url = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "简历附件存放地址", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    position = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, comment: "岗位 POSITION（1-Java，2-MF，3-C，4-.net，5-Testing，6-BI，7-PMA，8-Ba，9-Admin，10-Other）", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    position_comment = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "岗位备注", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    native_place_prov = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: true, comment: "户籍地址省份", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    native_place_city = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: true, comment: "户籍地址城市", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    native_place_comment = table.Column<string>(type: "varchar(90)", maxLength: 90, nullable: true, comment: "户籍地址备注", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    in_company_time = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: true, comment: "入职公司时间 如 2016-10-01", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    in_proj_time = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: true, comment: "入职项目时间 如 2016-10-01", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    leave_time = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: true, comment: "离职时间 如 2016-10-01", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    remark = table.Column<string>(type: "varchar(900)", maxLength: 900, nullable: true, comment: "备注信息", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    employmt_agreemt = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, comment: "结业协议签署情况 SIGN_EPMTAGMT(1-已签署 2-未签署)", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    del = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: false, defaultValueSql: "'N'", comment: "删除标志字段(N-标识正在使用，Y-标识被删除)", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, defaultValueSql: "''", comment: "创建时间（YYYY-MM-DD HH-mm-SS）", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, defaultValueSql: "''", comment: "创建人", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, defaultValueSql: "''", comment: "修改时间（YYYY-MM-DD HH-mm-SS）", collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, defaultValueSql: "''", comment: "修改人", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                },
                comment: "人才信息表")
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "news",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false, comment: "id")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    news_title = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true, comment: "新闻标题", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    news_title_en_US = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    news_title_zh_TW = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true, collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    news_tag = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: true, comment: "新闻标签", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    news_tag_en_US = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    news_tag_zh_TW = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    publication_date = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "发表日期（yyyy-MM-DD HH-mm-SS）", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_date = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "更新日期（yyyy-MM-DD HH-mm-SS）", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    news_card_image = table.Column<string>(type: "mediumtext", nullable: true, comment: "新闻卡片图片", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    new_introduction = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "新闻简介", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    new_introduction_en_US = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    new_introduction_zh_TW = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    new_content = table.Column<string>(type: "longtext", nullable: true, comment: "新闻正文内容", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    new_content_en_US = table.Column<string>(type: "longtext", nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    new_content_zh_TW = table.Column<string>(type: "longtext", nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    reading_volume = table.Column<int>(type: "int", nullable: true, comment: "阅读量"),
                    is_display_homepage = table.Column<int>(type: "int", nullable: true, comment: "是否在首页展示(0-不展示，1-展示)"),
                    is_delete = table.Column<int>(type: "int", nullable: true, comment: "删除标记（0-未删除，1-已删除）"),
                    linked_url = table.Column<string>(type: "varchar(300)", maxLength: 300, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "order",
                columns: table => new
                {
                    order_no = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "订单号", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    order_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "订单名称", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    order_status = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "订单状态（0-未支付 1-待支付 2-已支付 3-支付已取消 4- 支付失败 5-已退款）", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    course_id = table.Column<int>(type: "int", nullable: true, comment: "课程id"),
                    enrollId = table.Column<int>(type: "int", nullable: true, comment: "报名Id"),
                    order_fee = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "订单金额", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_time = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "订单创建时间", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    payment_time = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "支付时间", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    user_id = table.Column<int>(type: "int", nullable: true, comment: "支付人")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.order_no);
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "paper",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false, comment: "id自增主键")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    no = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, defaultValueSql: "''", comment: "试卷号（使用UUID生成）", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    name = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, defaultValueSql: "''", comment: "试卷名称", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    use_flag = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: false, defaultValueSql: "''", comment: "试卷用途标识 USE_FLAG ：1-课前测评，2-课后测评，3-通用", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    property = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: false, defaultValueSql: "''", comment: "试卷属性 PAPER_PROP：1-测试，2-问卷", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    description = table.Column<string>(type: "varchar(5000)", maxLength: 5000, nullable: true, comment: "试卷描述，考生不可见", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    instruction = table.Column<string>(type: "varchar(5000)", maxLength: 5000, nullable: true, comment: "试卷说明，考生可见", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    total_item = table.Column<int>(type: "int", nullable: false, comment: "总题数"),
                    total_score = table.Column<int>(type: "int", nullable: true, defaultValueSql: "'0'", comment: "总分值"),
                    pass_line = table.Column<int>(type: "int", nullable: true, defaultValueSql: "'0'", comment: "试卷及格线"),
                    total_time = table.Column<int>(type: "int", nullable: false, comment: "总时长（单位min）-1表示不限制时长"),
                    leave_limit = table.Column<int>(type: "int", nullable: true, defaultValueSql: "'0'", comment: "限定离开次数，超过限制即默认提交试卷(只针对限定考试总时长的情况，否则默认为0)"),
                    finish_flag = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: false, defaultValueSql: "''", comment: "试卷创建完成标志位 PAPER_INIT_DONE：0-未完成创建，1-完成创建", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    url = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, defaultValueSql: "''", comment: "考试链接", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    del = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, defaultValueSql: "'N'", comment: "删除标志字段(N-标识正在使用，Y-标识被删除)", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    enable = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: false, defaultValueSql: "''", comment: "生效标识：T-生效，F-不生效", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, defaultValueSql: "''", comment: "创建时间（YYYY-MM-DD HH-mm-SS）", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_person = table.Column<string>(type: "varchar(55)", maxLength: 55, nullable: false, defaultValueSql: "''", comment: "创建人", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, defaultValueSql: "''", comment: "修改时间（YYYY-MM-DD HH-mm-SS）", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_person = table.Column<string>(type: "varchar(55)", maxLength: 55, nullable: false, defaultValueSql: "''", comment: "修改人", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    identification = table.Column<string>(type: "varchar(4)", maxLength: 4, nullable: true, comment: "（试卷标识）试卷类型（01-java,02-MF，03-testing）+考试语言(0-中文，1-英文)+考生是否应届（0-应届，1-已毕业）", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                },
                comment: "试卷表")
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "paper_section",
                columns: table => new
                {
                    paper_id = table.Column<int>(type: "int", nullable: false, comment: "试卷ID"),
                    section_id = table.Column<int>(type: "int", nullable: false, comment: "模块ID"),
                    order = table.Column<int>(type: "int", nullable: false, comment: "排序：1,2,3")
                },
                constraints: table =>
                {
                },
                comment: "试卷模块对应表")
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "person_attendance",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    user_id = table.Column<int>(type: "int", nullable: false, comment: "用户ID"),
                    date = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, comment: "签到日期", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    ipAddress = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "签到IP", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    latitude = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "签到纬度", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    longitude = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "签到经度", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                },
                comment: "用户签到表")
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "person_paper",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    user_id = table.Column<int>(type: "int", nullable: false, comment: "考生id"),
                    plan_id = table.Column<int>(type: "int", nullable: false, comment: "班级id"),
                    paper_id = table.Column<int>(type: "int", nullable: false, comment: "试卷id"),
                    paper_no = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, defaultValueSql: "''", comment: "试卷编号", collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.Id);
                },
                comment: "人员试卷关联表")
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "plan_paper",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false, comment: "主键ID")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    status = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, defaultValueSql: "'0'", comment: "状态 0-未布置 1-已布置", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    plan_id = table.Column<int>(type: "int", nullable: false, comment: "教学计划ID"),
                    class_id = table.Column<int>(type: "int", nullable: false, comment: "班级ID"),
                    teacher_id = table.Column<int>(type: "int", nullable: true, defaultValueSql: "'0'", comment: "老师ID"),
                    paper_id = table.Column<int>(type: "int", nullable: false, comment: "试卷ID"),
                    paper_number = table.Column<string>(type: "varchar(32)", maxLength: 32, nullable: false, comment: "试卷编号 UUID", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    paper_type = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "试卷属性 1-测试，2-练习", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    paper_start_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, comment: "试卷开始时间(20150901 115959000)", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    paper_end_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, comment: "试卷结束时间(20150901 115959000)", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    paper_long_time = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "试卷时长(XDXHXM)", collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    paper_remark = table.Column<string>(type: "varchar(1000)", maxLength: 1000, nullable: true, comment: "试卷备注", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    url = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "试卷链接", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    del = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, defaultValueSql: "'N'", comment: "删除标示 Y-已删除 N-未删除", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, comment: "创建时间(20150901 115959000)", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, comment: "创建人", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, comment: "修改时间(20150901 115959000)", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, comment: "修改人", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                },
                comment: "计划与测试对应表")
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "plan_paper_stu_his",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false, comment: "主键ID")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    plan_paper_id = table.Column<int>(type: "int", nullable: false, comment: "计划测试ID"),
                    student_id = table.Column<int>(type: "int", nullable: false, comment: "学生ID（对应于sm_person中的人员）"),
                    status = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, defaultValueSql: "'0'", comment: "状态 0-未完成 1-已完成 2-已批阅", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    start_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: true, comment: "答卷开始时间(20150901 115959000)", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    end_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: true, comment: "答卷结束时间(20150901 115959000)", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    long_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: true, comment: "答卷耗时(XDXHXM)", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    correct_number = table.Column<int>(type: "int", nullable: true, comment: "正确题数"),
                    score = table.Column<float>(type: "float", nullable: true, comment: "分数"),
                    make_up = table.Column<int>(type: "int", nullable: true, defaultValueSql: "'0'", comment: "是否参加补考（0-未参加，1-已参加）"),
                    operation_score = table.Column<float>(type: "float", nullable: true, comment: "操作考分数"),
                    teacher_id = table.Column<int>(type: "int", nullable: true, comment: "批卷人"),
                    check_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: true, comment: "批卷时间(20150901 115959000)", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    del = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, defaultValueSql: "'N'", comment: "删除标示 Y-已删除 N-未删除", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, comment: "创建时间(20150901 115959000)", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, comment: "创建人", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, comment: "修改时间(20150901 115959000)", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, comment: "修改人", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    plan_id = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                },
                comment: "作业完成情况表")
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "point",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    order = table.Column<int>(type: "int", nullable: true),
                    name = table.Column<string>(type: "varchar(90)", maxLength: 90, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    name_en_US = table.Column<string>(type: "varchar(180)", maxLength: 180, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    description = table.Column<string>(type: "varchar(600)", maxLength: 600, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    description_en_US = table.Column<string>(type: "varchar(800)", maxLength: 800, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    enable = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "question",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false, comment: "id自增主键")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    pid = table.Column<int>(type: "int", nullable: true, comment: "英文、繁体试卷关联中文id"),
                    type = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: false, defaultValueSql: "''", comment: "题型 QUST_TYPE：1-单选，2-多选，3-判断，4-填空，5-简答，6-综合，8-日期或其他，9-排序，10-选项填空", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    so_flag = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: false, defaultValueSql: "''", comment: "主客标识位 QUST_SO：s-Subject主观题，o-Object客观题", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    difficulty = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: false, defaultValueSql: "''", comment: "难易度 DIFFICULTY：1-易，2-中，3-难", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    property = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, defaultValueSql: "''", comment: "题目属性 QUST_PROP：00-练习题，01-课堂练习，02-课后练习，03-模拟练习，04-综合练习", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    use_flag = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, defaultValueSql: "''", comment: "用途标识位 USE_FLAG：1-教学，2-校招，3-通用", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    content = table.Column<string>(type: "varchar(12000)", maxLength: 12000, nullable: false, defaultValueSql: "''", comment: "题干", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    answer = table.Column<string>(type: "longtext", nullable: true, comment: "答案：主观参考，客观判题；多选题与多空填空题，答案之间用#$#来分隔", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    opt1 = table.Column<string>(type: "varchar(300)", maxLength: 300, nullable: true, comment: "选型内容一", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    opt2 = table.Column<string>(type: "varchar(300)", maxLength: 300, nullable: true, comment: "选型内容二", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    opt3 = table.Column<string>(type: "varchar(300)", maxLength: 300, nullable: true, comment: "选型内容三", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    opt4 = table.Column<string>(type: "varchar(300)", maxLength: 300, nullable: true, comment: "选型内容四", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    opt5 = table.Column<string>(type: "varchar(300)", maxLength: 300, nullable: true, comment: "选型内容五", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    opt6 = table.Column<string>(type: "varchar(300)", maxLength: 300, nullable: true, comment: "选型内容六", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    opt7 = table.Column<string>(type: "varchar(300)", maxLength: 300, nullable: true, comment: "选型内容七", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    opt8 = table.Column<string>(type: "varchar(300)", maxLength: 300, nullable: true, comment: "选型内容八", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    opt9 = table.Column<string>(type: "varchar(300)", maxLength: 300, nullable: true, comment: "选型内容九", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    opt10 = table.Column<string>(type: "varchar(300)", maxLength: 300, nullable: true, comment: "选型内容十", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    opt11 = table.Column<string>(type: "varchar(300)", maxLength: 300, nullable: true, comment: "选型内容十一", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    opt12 = table.Column<string>(type: "varchar(300)", maxLength: 300, nullable: true, comment: "选型内容十二", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    opt13 = table.Column<string>(type: "varchar(300)", maxLength: 300, nullable: true, comment: "选型内容十三", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    opt14 = table.Column<string>(type: "varchar(300)", maxLength: 300, nullable: true, comment: "选型内容十四", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    opt15 = table.Column<string>(type: "varchar(300)", maxLength: 300, nullable: true, comment: "选型内容十五", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    opt16 = table.Column<string>(type: "varchar(300)", maxLength: 300, nullable: true, comment: "选型内容十六", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    opt17 = table.Column<string>(type: "varchar(300)", maxLength: 300, nullable: true, comment: "选型内容十七", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    opt18 = table.Column<string>(type: "varchar(300)", maxLength: 300, nullable: true, comment: "选型内容十八", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    opt19 = table.Column<string>(type: "varchar(300)", maxLength: 300, nullable: true, comment: "选型内容十九", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    opt20 = table.Column<string>(type: "varchar(300)", maxLength: 300, nullable: true, comment: "选型内容二十", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    analysis = table.Column<string>(type: "varchar(2000)", maxLength: 2000, nullable: true, comment: "题目解析", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    enable = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: false, defaultValueSql: "''", comment: "生效标识：T-生效，F-不生效", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, defaultValueSql: "''", comment: "创建时间（YYYY-MM-DD HH-mm-SS）", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_person = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, defaultValueSql: "''", comment: "创建人", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, defaultValueSql: "''", comment: "修改时间（YYYY-MM-DD HH-mm-SS）", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_person = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, defaultValueSql: "''", comment: "修改人", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    paper_type = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, comment: "试卷类型（01-java,02-MF，03-testing）", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    language = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, comment: "考试语言(0-中文，1-英文)", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                },
                comment: "题库")
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "question_point",
                columns: table => new
                {
                    question_id = table.Column<int>(type: "int", nullable: false, comment: "题目ID"),
                    point_id = table.Column<int>(type: "int", nullable: false, comment: "知识点ID")
                },
                constraints: table =>
                {
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "question_tag",
                columns: table => new
                {
                    question_id = table.Column<int>(type: "int", nullable: false, comment: "题目ID"),
                    tag_id = table.Column<int>(type: "int", nullable: false, comment: "标签ID")
                },
                constraints: table =>
                {
                },
                comment: "题目标签对应表")
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "qusetion_images",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false, comment: "主键ID\r")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    question_id = table.Column<int>(type: "int", nullable: false, comment: "试题id\r"),
                    type = table.Column<int>(type: "int", nullable: false, comment: "类型 0:试题图片 1:选项图片\r"),
                    opt = table.Column<int>(type: "int", nullable: true, comment: "选项 1~6对应A~F对应opt1~opt6\r"),
                    image_id = table.Column<string>(type: "varchar(32)", maxLength: 32, nullable: false, comment: "图片的id(UUID)\r", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    order = table.Column<int>(type: "int", nullable: false, comment: "顺序 0~10\r"),
                    flag = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'1'", comment: "有效标识 0-无效 1-有效\r"),
                    del = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, defaultValueSql: "'N'", comment: "删除标示 Y-已删除 N-未删除\r", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, comment: "创建时间(20150901 115959000)\r", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, comment: "创建人\r", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, comment: "修改时间(20150901 115959000)\r", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, comment: "修改人\r", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                },
                comment: "试题图片扩展表")
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "refreshtoken",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    account = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: false, collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    refreshtoken = table.Column<string>(type: "varchar(2047)", maxLength: 2047, nullable: false, collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_general_ci");

            migrationBuilder.CreateTable(
                name: "section",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false, comment: "id主键自增")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    name = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, defaultValueSql: "''", comment: "模块名称", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    instruction = table.Column<string>(type: "varchar(2000)", maxLength: 2000, nullable: true, comment: "模块说明，考生可见", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_time = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, defaultValueSql: "''", comment: "创建时间（YYYY-MM-DD HH-mm-SS）", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_person = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, defaultValueSql: "''", comment: "创建人", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_time = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, defaultValueSql: "''", comment: "修改时间（YYYY-MM-DD HH-mm-SS）", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_person = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, defaultValueSql: "''", comment: "修改人", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                },
                comment: "试卷模块表")
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "section_question",
                columns: table => new
                {
                    section_id = table.Column<int>(type: "int", nullable: false, comment: "部分ID"),
                    question_id = table.Column<int>(type: "int", nullable: false, comment: "题目ID"),
                    question_score = table.Column<float>(type: "float(5,2)", nullable: false, comment: "题目分值"),
                    order = table.Column<int>(type: "int", nullable: false, comment: "排序：1,2,3"),
                    show_relation = table.Column<int>(type: "int", nullable: false),
                    show_condition = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    is_it_required = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                },
                comment: "模块与题目对应表")
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "skill",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    order = table.Column<int>(type: "int", nullable: true),
                    name = table.Column<string>(type: "varchar(60)", maxLength: 60, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    name_en_US = table.Column<string>(type: "varchar(120)", maxLength: 120, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    name_zh_TW = table.Column<string>(type: "varchar(60)", maxLength: 60, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    type = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    parent_id = table.Column<int>(type: "int", nullable: false),
                    description = table.Column<string>(type: "varchar(600)", maxLength: 600, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    description_en_US = table.Column<string>(type: "varchar(800)", maxLength: 800, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    description_zh_TW = table.Column<string>(type: "varchar(600)", maxLength: 600, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    level = table.Column<string>(type: "varchar(3)", maxLength: 3, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    enable = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "sm_menu",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    name = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    name_zh_TW = table.Column<string>(type: "varchar(60)", maxLength: 60, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    name_en_US = table.Column<string>(type: "varchar(60)", maxLength: 60, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    description = table.Column<string>(type: "varchar(400)", maxLength: 400, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    description_zh_TW = table.Column<string>(type: "varchar(600)", maxLength: 600, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    description_en_US = table.Column<string>(type: "varchar(600)", maxLength: 600, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    url = table.Column<string>(type: "varchar(90)", maxLength: 90, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    level = table.Column<int>(type: "int", nullable: false),
                    parent_id = table.Column<int>(type: "int", nullable: false),
                    order = table.Column<int>(type: "int", nullable: false),
                    enable = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "sm_option",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    name = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    name_zh_TW = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    name_en_US = table.Column<string>(type: "varchar(60)", maxLength: 60, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    level = table.Column<int>(type: "int", nullable: false),
                    type = table.Column<int>(type: "int", nullable: false),
                    value = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    parent_id = table.Column<int>(type: "int", nullable: false),
                    order = table.Column<int>(type: "int", nullable: false),
                    enable = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "sm_person",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    role = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    username = table.Column<string>(type: "varchar(32)", maxLength: 32, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    password = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    no = table.Column<string>(type: "varchar(15)", maxLength: 15, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    exam_num = table.Column<string>(type: "varchar(45)", maxLength: 45, nullable: true, comment: "准考证号", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    type = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    name = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    en_name = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    gender = table.Column<string>(type: "varchar(3)", maxLength: 3, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    cardtype = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    cardno = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    mobile = table.Column<string>(type: "varchar(11)", maxLength: 11, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    phone = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    email = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true, collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    age = table.Column<int>(type: "int", nullable: true),
                    birthday = table.Column<string>(type: "varchar(8)", maxLength: 8, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    education_background = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    degree = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    university = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    college = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    major = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    cet4 = table.Column<float>(type: "float(5,2)", nullable: true),
                    cet6 = table.Column<float>(type: "float(5,2)", nullable: true),
                    gpa = table.Column<float>(type: "float(5,3)", nullable: true),
                    description = table.Column<string>(type: "varchar(1500)", maxLength: 1500, nullable: true, collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    direction = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    contact_address = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    contact_postcode = table.Column<string>(type: "varchar(6)", maxLength: 6, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    home_address = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    home_postcode = table.Column<string>(type: "varchar(6)", maxLength: 6, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    photo = table.Column<string>(type: "mediumtext", nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    resume = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    enable = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    student_source = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "考生来源", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    identification = table.Column<string>(type: "varchar(4)", maxLength: 4, nullable: true, comment: "(试卷标识）试卷类型（01-java,02-MF，03-testing）+考试语言(0-中文，1-英文)+考生是否应届（0-应届，1-已毕业）", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    state = table.Column<int>(type: "int", nullable: true),
                    code = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    profilepath = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "sm_role",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    name = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    name_zh_TW = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    name_en_US = table.Column<string>(type: "varchar(60)", maxLength: 60, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    description = table.Column<string>(type: "varchar(400)", maxLength: 400, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    description_zh_TW = table.Column<string>(type: "varchar(400)", maxLength: 400, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    description_en_US = table.Column<string>(type: "varchar(600)", maxLength: 600, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    enable = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "tag",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    name = table.Column<string>(type: "varchar(30)", maxLength: 30, nullable: false, defaultValueSql: "''", comment: "标签名称", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    description = table.Column<string>(type: "varchar(300)", maxLength: 300, nullable: true, comment: "标签说明", collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    user_count = table.Column<int>(type: "int", nullable: false, comment: "使用次数"),
                    enable = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: false, defaultValueSql: "''", comment: "生效标识：T-生效，F-不生效", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, defaultValueSql: "''", comment: "创建时间", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_person = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, defaultValueSql: "''", comment: "创建人", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                },
                comment: "标签库")
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "test_table",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    no = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    sex = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: false, defaultValueSql: "'男'", comment: "性别", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    age = table.Column<int>(type: "int", nullable: true, comment: "年龄"),
                    nativePlace = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "籍贯", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    enable = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "状态（是否可用）", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "total_score",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false, comment: "主键ID\r")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    plan_id = table.Column<int>(type: "int", nullable: false, comment: "教学计划ID\r"),
                    student_id = table.Column<int>(type: "int", nullable: false, comment: "学生ID\r"),
                    normal_score = table.Column<float>(type: "float(5,2)", nullable: false, comment: "平时分\r"),
                    attendance_score = table.Column<float>(type: "float(5,2)", nullable: false, comment: "考勤分\r"),
                    attitude_score = table.Column<float>(type: "float(5,2)", nullable: false, comment: "态度分\r"),
                    exam_score = table.Column<float>(type: "float(5,2)", nullable: false, comment: "测试分\r"),
                    total_score = table.Column<float>(type: "float(5,2)", nullable: false, comment: "总分\r"),
                    flag = table.Column<int>(type: "int", nullable: false, comment: "有效标识 0-无效 1-有效\r"),
                    del = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, defaultValueSql: "'N'", comment: "删除标示 Y-已删除 N-未删除\r", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, comment: "创建时间(20150901 115959000)\r", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, comment: "创建人\r", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, comment: "修改时间(20150901 115959000)\r", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, comment: "修改人\r", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                },
                comment: "学生总成绩表")
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "total_score_ratio",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false, comment: "主键ID")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    plan_id = table.Column<int>(type: "int", nullable: false, comment: "教学计划ID"),
                    normal_ratio = table.Column<int>(type: "int", nullable: false, comment: "平时成绩比例"),
                    attendance_ratio = table.Column<int>(type: "int", nullable: false, comment: "考勤成绩比例"),
                    attitude_ratio = table.Column<int>(type: "int", nullable: false, comment: "态度成绩比例"),
                    exam_ratio = table.Column<int>(type: "int", nullable: false, comment: "最后测试成绩比例"),
                    del = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, defaultValueSql: "'N'", comment: "删除标示 Y-已删除 N-未删除", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, comment: "创建时间(20150901 115959000)", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, comment: "创建人", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, comment: "修改时间(20150901 115959000)", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, comment: "修改人", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                },
                comment: "总成绩组成加权表")
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "univ_attn",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false, comment: "主键")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    name = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, defaultValueSql: "''", comment: "联系人名", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    gender = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, defaultValueSql: "''", comment: "性别", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    mobile = table.Column<string>(type: "varchar(11)", maxLength: 11, nullable: true, defaultValueSql: "''", comment: "联系人手机", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    phone = table.Column<string>(type: "varchar(15)", maxLength: 15, nullable: true, defaultValueSql: "''", comment: "联系人座机", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    email = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, defaultValueSql: "''", comment: "联系人邮箱", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    position = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, defaultValueSql: "''", comment: "职务", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    univ_id = table.Column<int>(type: "int", nullable: false, comment: "学校id"),
                    univ_branch_id = table.Column<int>(type: "int", nullable: true, comment: "分校id"),
                    college_id = table.Column<int>(type: "int", nullable: true, comment: "学院id"),
                    create_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: true, comment: "创建时间", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_user = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "创建人", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: true, comment: "更新时间", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_user = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "更新人", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    del = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: false, defaultValueSql: "'N'", comment: "删除标志字段(Y:删除 N:正在被使用)", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                },
                comment: "联系人信息表(UNIV_ATTN)")
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "univ_college",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false, comment: "主键")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    univ_id = table.Column<int>(type: "int", nullable: false, comment: "学校id"),
                    name = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, defaultValueSql: "''", comment: "学院名称", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: true, comment: "创建时间", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_user = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "创建人", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: true, comment: "更新时间", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_user = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "更新人", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    del = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: false, defaultValueSql: "'N'", comment: "删除标志字段(Y:删除 N:正在被使用)", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                },
                comment: "学院信息表(UNIV_COLLEGE)")
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "univ_coop",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false, comment: "主键")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    coop_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, defaultValueSql: "''", comment: "合作时间", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    company_name = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false, defaultValueSql: "''", comment: "公司名称", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    univ_id = table.Column<int>(type: "int", nullable: false, comment: "学校id"),
                    univ_branch_id = table.Column<int>(type: "int", nullable: true, comment: "分校id"),
                    college_id = table.Column<int>(type: "int", nullable: true, comment: "学院id"),
                    country = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: false, defaultValueSql: "''", comment: "国家", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    province = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: false, defaultValueSql: "''", comment: "省", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    city = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: false, defaultValueSql: "''", comment: "市", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    status = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, comment: "合作状态 COOP_STATE ( 1-合作中 2-待合作)", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    style = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, comment: "合作方式 COOP_WAY ( 1-课程嵌入 2-学分置换 3-定制班级 4-虚拟银行 5-校园招聘 6-其它合作)", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    recruit_email = table.Column<string>(type: "varchar(30)", maxLength: 30, nullable: true, comment: "招生状态 COOP_RECRU_STATE (1-已经校招 2-暂不跟进)—>改为招生邮箱", collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    recruit_time = table.Column<string>(type: "varchar(30)", maxLength: 30, nullable: true, comment: "招生时间", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    remark = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "备注", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: true, comment: "创建时间", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_user = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "创建人", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: true, comment: "更新时间", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_user = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "更新人", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    del = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: false, defaultValueSql: "'N'", comment: "删除标志字段(Y:删除 N:正在被使用)", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                },
                comment: "合作信息表(UNIV_COOP)")
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "univ_coop_attn",
                columns: table => new
                {
                    coop_id = table.Column<int>(type: "int", nullable: false, comment: "合作ID"),
                    attn_id = table.Column<int>(type: "int", nullable: false, comment: "联系人ID")
                },
                constraints: table =>
                {
                },
                comment: "合作联系人对应表")
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "univ_coop_history",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false, comment: "主键自增长")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    coop_id = table.Column<int>(type: "int", nullable: false, comment: "合作编号"),
                    time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, comment: "改变状态时间", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    contacts = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false, collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    status = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: false, comment: "状态", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    remark = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "备注", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, comment: "创建时间", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_user = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, comment: "创建人", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, comment: "更新时间", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_user = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, comment: "更新人", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    del = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: false, comment: "删除标记", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "univ_work_hist",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false, comment: "主键")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    op_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, defaultValueSql: "''", comment: "操作时间", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    op_user_name = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, defaultValueSql: "''", comment: "操办人名", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    univ_id = table.Column<int>(type: "int", nullable: false, comment: "学校ID"),
                    univ_branch_id = table.Column<int>(type: "int", nullable: true, comment: "分校id"),
                    college_id = table.Column<int>(type: "int", nullable: true, comment: "学院id"),
                    work_content = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: false, defaultValueSql: "''", comment: "工作内容", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    op_status = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, comment: "执行状态 OP_STATE (1-已完成 2-未完成)", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    remark = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "备注", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: true, comment: "创建时间", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_user = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "创建人", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: true, comment: "更新时间", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_user = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "更新人", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    del = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: false, defaultValueSql: "'N'", comment: "删除标志字段(Y:删除 N:正在被使用)", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                },
                comment: "工作历史信息表(UNIV_WORK_HIST)")
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "university",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false, comment: "主键")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    parent_id = table.Column<int>(type: "int", nullable: true, defaultValueSql: "'0'", comment: "父级id"),
                    name = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, defaultValueSql: "''", comment: "学校名称", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    type = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: false, defaultValueSql: "'6'", comment: "学校层次( UNIV_LEVEL 1-985 2-211 3-本科 4-专科 5-中专 6-其它 )", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    quality = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: false, defaultValueSql: "'5'", comment: "学校性质（UNIV_PROP 1-公办 2-民办 3-独立学院 4-培训机构 5-其它）", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    country = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: false, defaultValueSql: "''", comment: "国家", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    province = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: false, defaultValueSql: "''", comment: "省", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    city = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: false, defaultValueSql: "''", comment: "市", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    detail_addr = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false, defaultValueSql: "''", comment: "详细地址", collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    website = table.Column<string>(type: "varchar(30)", maxLength: 30, nullable: true, comment: "网址", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    phone = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "电话", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    email = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "邮箱", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    del = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: false, defaultValueSql: "'N'", comment: "删除标志字段(Y:删除 N:正在被使用)", collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, defaultValueSql: "''", comment: "创建时间", collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_user = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, defaultValueSql: "''", comment: "创建人", collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, defaultValueSql: "''", comment: "更新时间", collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_user = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, defaultValueSql: "''", comment: "更新人", collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                },
                comment: "学校信息表(UNIVERSITY)")
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "user_paper_answer",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    userid = table.Column<int>(type: "int", nullable: false, comment: "用户id"),
                    planid = table.Column<int>(type: "int", nullable: false, comment: "教学计划id"),
                    paperid = table.Column<int>(type: "int", nullable: false, comment: "试卷id"),
                    sectionorder = table.Column<int>(type: "int", nullable: false, comment: "试卷大题题号顺序"),
                    questionorder = table.Column<int>(type: "int", nullable: false, comment: "试卷小题题号顺序"),
                    answer = table.Column<string>(type: "varchar(4000)", maxLength: 4000, nullable: true, comment: "考生答案", collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    score = table.Column<float>(type: "float(5,2)", nullable: true, comment: "得分分数"),
                    markingperson = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "阅卷人，系统或人", collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    createdatetime = table.Column<DateTime>(type: "datetime", nullable: false),
                    modifydatetime = table.Column<DateTime>(type: "datetime", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"),
                    operatorid = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: false, collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_general_ci");

            migrationBuilder.CreateTable(
                name: "user_paper_question_seq",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    userid = table.Column<int>(type: "int", nullable: false, comment: "用户id"),
                    planid = table.Column<int>(type: "int", nullable: false, comment: "教学计划id"),
                    paperid = table.Column<int>(type: "int", nullable: false, comment: "试卷id"),
                    sectionorder = table.Column<int>(type: "int", nullable: false, comment: "试卷大题题号顺序"),
                    questionorder = table.Column<int>(type: "int", nullable: false, comment: "试卷小题题号顺序"),
                    userquestionorder = table.Column<int>(type: "int", nullable: false, comment: "用户看到的题号顺序"),
                    createdatetime = table.Column<DateTime>(type: "datetime", nullable: false),
                    modifydatetime = table.Column<DateTime>(type: "datetime", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"),
                    operatorid = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: false, collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_general_ci");

            migrationBuilder.CreateTable(
                name: "verifycode",
                columns: table => new
                {
                    cellphone = table.Column<string>(type: "varchar(255)", nullable: false, comment: "手机号码", collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    verifycode = table.Column<string>(type: "varchar(6)", maxLength: 6, nullable: false, comment: "验证码", collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.cellphone);
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_general_ci");

            migrationBuilder.CreateTable(
                name: "video_course",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false, comment: "id自增主键")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    classBeginsId = table.Column<int>(type: "int", nullable: true, comment: "开课Id"),
                    courseId = table.Column<int>(type: "int", nullable: true, comment: "课程Id"),
                    fileName = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "文件名", collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    fileType = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "文件类型", collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    fileAddress = table.Column<byte[]>(type: "blob", nullable: true, comment: "文件地址"),
                    createTime = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "创建时间", collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    creator = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人", collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    updateTime = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "更新时间", collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    updator = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "更新人", collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    del = table.Column<int>(type: "int", nullable: true, comment: "是否删除"),
                    remark = table.Column<string>(type: "varchar(4000)", maxLength: 4000, nullable: true, comment: "备注", collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_general_ci");

            migrationBuilder.CreateTable(
                name: "teach_plan",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    class_id = table.Column<int>(type: "int", nullable: false),
                    start_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    end_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    tree_snap = table.Column<string>(type: "mediumtext", nullable: true, collation: "utf8mb3_general_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                    table.ForeignKey(
                        name: "teach_plan_ibfk_1",
                        column: x => x.class_id,
                        principalTable: "class",
                        principalColumn: "id");
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "course_point",
                columns: table => new
                {
                    course_id = table.Column<int>(type: "int", nullable: false),
                    point_id = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.ForeignKey(
                        name: "course_point_ibfk_1",
                        column: x => x.course_id,
                        principalTable: "course",
                        principalColumn: "id");
                    table.ForeignKey(
                        name: "course_point_ibfk_2",
                        column: x => x.point_id,
                        principalTable: "point",
                        principalColumn: "id");
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "point_detail",
                columns: table => new
                {
                    point_id = table.Column<int>(type: "int", nullable: false),
                    cost = table.Column<float>(type: "float(5,2)", nullable: true),
                    description = table.Column<string>(type: "varchar(600)", maxLength: 600, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    description_en_US = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    material_file_name = table.Column<string>(type: "varchar(60)", maxLength: 60, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    material_content_type = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    material_file_size = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    material_dir = table.Column<string>(type: "varchar(300)", maxLength: 300, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    part = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    from_page = table.Column<int>(type: "int", nullable: true),
                    to_page = table.Column<int>(type: "int", nullable: true),
                    t_handbook_file_name = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    t_handbook_content_type = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    t_handbook_file_size = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    t_handbook_dir = table.Column<string>(type: "varchar(300)", maxLength: 300, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    s_handbook_file_name = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    s_handbook_content_type = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    s_handbook_file_size = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    s_handbook_dir = table.Column<string>(type: "varchar(300)", maxLength: 300, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    reference_file_name = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    reference_content_type = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    reference_file_size = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    reference_dir = table.Column<string>(type: "varchar(300)", maxLength: 300, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    goal = table.Column<string>(type: "varchar(600)", maxLength: 600, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    goal_en_US = table.Column<string>(type: "varchar(900)", maxLength: 900, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.ForeignKey(
                        name: "point_detail_ibfk_1",
                        column: x => x.point_id,
                        principalTable: "point",
                        principalColumn: "id");
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "teach_practice",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    point_id = table.Column<int>(type: "int", nullable: true),
                    order = table.Column<int>(type: "int", nullable: true),
                    property = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    type = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    level = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    description = table.Column<string>(type: "varchar(600)", maxLength: 600, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    option1 = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    option2 = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    option3 = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    option4 = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    option5 = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    option6 = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    answer = table.Column<string>(type: "varchar(900)", maxLength: 900, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    dir = table.Column<string>(type: "varchar(300)", maxLength: 300, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    enable = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    create_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_time = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    update_person = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PRIMARY", x => x.id);
                    table.ForeignKey(
                        name: "teach_practice_ibfk_1",
                        column: x => x.point_id,
                        principalTable: "point",
                        principalColumn: "id");
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "skill_point",
                columns: table => new
                {
                    skill_id = table.Column<int>(type: "int", nullable: false),
                    point_id = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.ForeignKey(
                        name: "skill_point_ibfk_1",
                        column: x => x.skill_id,
                        principalTable: "skill",
                        principalColumn: "id");
                    table.ForeignKey(
                        name: "skill_point_ibfk_2",
                        column: x => x.point_id,
                        principalTable: "point",
                        principalColumn: "id");
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "class_student",
                columns: table => new
                {
                    class_id = table.Column<int>(type: "int", nullable: false),
                    student_id = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.ForeignKey(
                        name: "class_student_ibfk_1",
                        column: x => x.class_id,
                        principalTable: "class",
                        principalColumn: "id");
                    table.ForeignKey(
                        name: "class_student_ibfk_2",
                        column: x => x.student_id,
                        principalTable: "sm_person",
                        principalColumn: "id");
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "teacher_point",
                columns: table => new
                {
                    teacher_id = table.Column<int>(type: "int", nullable: false),
                    point_id = table.Column<int>(type: "int", nullable: false),
                    manage = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: false, defaultValueSql: "'N'", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.ForeignKey(
                        name: "teacher_point_ibfk_1",
                        column: x => x.teacher_id,
                        principalTable: "sm_person",
                        principalColumn: "id");
                    table.ForeignKey(
                        name: "teacher_point_ibfk_2",
                        column: x => x.point_id,
                        principalTable: "point",
                        principalColumn: "id");
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "sm_person_role",
                columns: table => new
                {
                    user_id = table.Column<int>(type: "int", nullable: false),
                    role_id = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.ForeignKey(
                        name: "sm_person_role_ibfk_1",
                        column: x => x.user_id,
                        principalTable: "sm_person",
                        principalColumn: "id");
                    table.ForeignKey(
                        name: "sm_person_role_ibfk_2",
                        column: x => x.role_id,
                        principalTable: "sm_role",
                        principalColumn: "id");
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "sm_role_menu",
                columns: table => new
                {
                    role_id = table.Column<int>(type: "int", nullable: false),
                    menu_id = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.ForeignKey(
                        name: "sm_role_menu_ibfk_1",
                        column: x => x.role_id,
                        principalTable: "sm_role",
                        principalColumn: "id");
                    table.ForeignKey(
                        name: "sm_role_menu_ibfk_2",
                        column: x => x.menu_id,
                        principalTable: "sm_menu",
                        principalColumn: "id");
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateTable(
                name: "detail_plan",
                columns: table => new
                {
                    teach_plan_id = table.Column<int>(type: "int", nullable: false),
                    point_id = table.Column<int>(type: "int", nullable: false),
                    starttime = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    endtime = table.Column<string>(type: "varchar(18)", maxLength: 18, nullable: false, defaultValueSql: "''", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3"),
                    cost = table.Column<float>(type: "float(5,2)", nullable: false),
                    teacher_id = table.Column<int>(type: "int", nullable: true, defaultValueSql: "'0'"),
                    finish_state = table.Column<string>(type: "varchar(2)", maxLength: 2, nullable: false, defaultValueSql: "''", comment: "完成情况", collation: "utf8mb3_unicode_ci")
                        .Annotation("MySql:CharSet", "utf8mb3")
                },
                constraints: table =>
                {
                    table.ForeignKey(
                        name: "detail_plan_ibfk_1",
                        column: x => x.teach_plan_id,
                        principalTable: "teach_plan",
                        principalColumn: "id");
                })
                .Annotation("MySql:CharSet", "utf8mb3")
                .Annotation("Relational:Collation", "utf8mb3_unicode_ci");

            migrationBuilder.CreateIndex(
                name: "idx_answer_info",
                table: "answer_info",
                columns: new[] { "user_id", "plan_id", "paper_id" },
                unique: true);

            migrationBuilder.CreateIndex(
                name: "idx_answer_sheet",
                table: "answer_sheet",
                columns: new[] { "paper_id", "plan_id", "question_id", "user_id" },
                unique: true);

            migrationBuilder.CreateIndex(
                name: "idx_certificateno",
                table: "certificate",
                column: "certificateNumber",
                unique: true);

            migrationBuilder.CreateIndex(
                name: "class_id",
                table: "class_student",
                column: "class_id");

            migrationBuilder.CreateIndex(
                name: "student_id",
                table: "class_student",
                column: "student_id");

            migrationBuilder.CreateIndex(
                name: "course_id",
                table: "course_point",
                column: "course_id");

            migrationBuilder.CreateIndex(
                name: "point_id",
                table: "course_point",
                column: "point_id");

            migrationBuilder.CreateIndex(
                name: "classBeginsId",
                table: "course_registration",
                columns: new[] { "classBeginsId", "seq" },
                unique: true);

            migrationBuilder.CreateIndex(
                name: "point_id",
                table: "detail_plan",
                column: "point_id");

            migrationBuilder.CreateIndex(
                name: "teach_plan_id",
                table: "detail_plan",
                column: "teach_plan_id");

            migrationBuilder.CreateIndex(
                name: "idx_paper_stu_his",
                table: "plan_paper_stu_his",
                columns: new[] { "student_id", "plan_id", "plan_paper_id" },
                unique: true);

            migrationBuilder.CreateIndex(
                name: "point_id",
                table: "point_detail",
                column: "point_id");

            migrationBuilder.CreateIndex(
                name: "point_id",
                table: "skill_point",
                column: "point_id");

            migrationBuilder.CreateIndex(
                name: "skill_id",
                table: "skill_point",
                column: "skill_id");

            migrationBuilder.CreateIndex(
                name: "value",
                table: "sm_option",
                column: "value");

            migrationBuilder.CreateIndex(
                name: "username",
                table: "sm_person",
                column: "username",
                unique: true);

            migrationBuilder.CreateIndex(
                name: "role_id",
                table: "sm_person_role",
                column: "role_id");

            migrationBuilder.CreateIndex(
                name: "user_id",
                table: "sm_person_role",
                column: "user_id");

            migrationBuilder.CreateIndex(
                name: "menu_id",
                table: "sm_role_menu",
                column: "menu_id");

            migrationBuilder.CreateIndex(
                name: "role_id",
                table: "sm_role_menu",
                column: "role_id");

            migrationBuilder.CreateIndex(
                name: "class_id",
                table: "teach_plan",
                column: "class_id");

            migrationBuilder.CreateIndex(
                name: "point_id",
                table: "teach_practice",
                column: "point_id");

            migrationBuilder.CreateIndex(
                name: "point_id",
                table: "teacher_point",
                column: "point_id");

            migrationBuilder.CreateIndex(
                name: "teacher_id",
                table: "teacher_point",
                column: "teacher_id");

            migrationBuilder.CreateIndex(
                name: "idx_user_answer_question",
                table: "user_paper_answer",
                columns: new[] { "userid", "planid", "paperid", "sectionorder", "questionorder" },
                unique: true);

            migrationBuilder.CreateIndex(
                name: "idx_user_answer_question1",
                table: "user_paper_question_seq",
                columns: new[] { "userid", "planid", "paperid", "sectionorder", "questionorder" },
                unique: true);
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "answer_info");

            migrationBuilder.DropTable(
                name: "answer_sheet");

            migrationBuilder.DropTable(
                name: "base_course");

            migrationBuilder.DropTable(
                name: "calendar");

            migrationBuilder.DropTable(
                name: "certificate");

            migrationBuilder.DropTable(
                name: "certificate_his");

            migrationBuilder.DropTable(
                name: "china_regions");

            migrationBuilder.DropTable(
                name: "class_begins");

            migrationBuilder.DropTable(
                name: "class_student");

            migrationBuilder.DropTable(
                name: "course_material");

            migrationBuilder.DropTable(
                name: "course_point");

            migrationBuilder.DropTable(
                name: "course_registration");

            migrationBuilder.DropTable(
                name: "detail_plan");

            migrationBuilder.DropTable(
                name: "exercise_score");

            migrationBuilder.DropTable(
                name: "exercise_score_ratio");

            migrationBuilder.DropTable(
                name: "interviewee");

            migrationBuilder.DropTable(
                name: "news");

            migrationBuilder.DropTable(
                name: "order");

            migrationBuilder.DropTable(
                name: "paper");

            migrationBuilder.DropTable(
                name: "paper_section");

            migrationBuilder.DropTable(
                name: "person_attendance");

            migrationBuilder.DropTable(
                name: "person_paper");

            migrationBuilder.DropTable(
                name: "plan_paper");

            migrationBuilder.DropTable(
                name: "plan_paper_stu_his");

            migrationBuilder.DropTable(
                name: "point_detail");

            migrationBuilder.DropTable(
                name: "question");

            migrationBuilder.DropTable(
                name: "question_point");

            migrationBuilder.DropTable(
                name: "question_tag");

            migrationBuilder.DropTable(
                name: "qusetion_images");

            migrationBuilder.DropTable(
                name: "refreshtoken");

            migrationBuilder.DropTable(
                name: "section");

            migrationBuilder.DropTable(
                name: "section_question");

            migrationBuilder.DropTable(
                name: "skill_point");

            migrationBuilder.DropTable(
                name: "sm_option");

            migrationBuilder.DropTable(
                name: "sm_person_role");

            migrationBuilder.DropTable(
                name: "sm_role_menu");

            migrationBuilder.DropTable(
                name: "tag");

            migrationBuilder.DropTable(
                name: "teach_practice");

            migrationBuilder.DropTable(
                name: "teacher_point");

            migrationBuilder.DropTable(
                name: "test_table");

            migrationBuilder.DropTable(
                name: "total_score");

            migrationBuilder.DropTable(
                name: "total_score_ratio");

            migrationBuilder.DropTable(
                name: "univ_attn");

            migrationBuilder.DropTable(
                name: "univ_college");

            migrationBuilder.DropTable(
                name: "univ_coop");

            migrationBuilder.DropTable(
                name: "univ_coop_attn");

            migrationBuilder.DropTable(
                name: "univ_coop_history");

            migrationBuilder.DropTable(
                name: "univ_work_hist");

            migrationBuilder.DropTable(
                name: "university");

            migrationBuilder.DropTable(
                name: "user_paper_answer");

            migrationBuilder.DropTable(
                name: "user_paper_question_seq");

            migrationBuilder.DropTable(
                name: "verifycode");

            migrationBuilder.DropTable(
                name: "video_course");

            migrationBuilder.DropTable(
                name: "course");

            migrationBuilder.DropTable(
                name: "teach_plan");

            migrationBuilder.DropTable(
                name: "skill");

            migrationBuilder.DropTable(
                name: "sm_role");

            migrationBuilder.DropTable(
                name: "sm_menu");

            migrationBuilder.DropTable(
                name: "sm_person");

            migrationBuilder.DropTable(
                name: "point");

            migrationBuilder.DropTable(
                name: "class");
        }
    }
}
